import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { BaseHttpService } from '@app/core/services/http/base.http.service';

export interface UserLogin {
  name: string;
  password: string;
}

@Injectable({
  providedIn: 'root'
})
export class LoginHttpService {

  constructor(
    public request: BaseHttpService,
  ) {}

  public login(params: UserLogin): Observable<string> {
    return this.request.post('/nest/v1/login', params, {});
  }
}
